package com.codegeek.project.common;

import com.codegeek.common.utils.AESUtil;

/**
 *
 * @author
 */
public class Decode {
    public static String getValue (String content) throws Exception {
        // 解密base64编码
//        String decodeBase64Text = new String(Base64.getDecoder().decode(content));
//        Integer contentLength = Integer.parseInt(decodeBase64Text.substring(65,67));
//        Integer firstHalfLength = contentLength % 2 ==1 ? (contentLength/2+1) : contentLength/2;
//        Integer theSecondHalfLength = contentLength - firstHalfLength;
//        String contentFirstHalf = decodeBase64Text.substring(10, 10 + firstHalfLength);
//        String contentTheSecondHalfLength = decodeBase64Text.substring(40, 40 + theSecondHalfLength);
//        return contentFirstHalf + contentTheSecondHalfLength;
        return AESUtil.decrypt(content).trim();
    }
}
